// uno.config.ts
import presetRemToPx from '@unocss/preset-rem-to-px'
import transformerDirectives from '@unocss/transformer-directives'
import transformerVariantGroup from '@unocss/transformer-variant-group'
import {
  defineConfig,
  presetAttributify,
  presetUno,
  presetWebFonts
} from 'unocss'
import {
  borderColorRules,
  gradientColorsRules,
  unoColorsRules,
  webFontsOptions
} from './config/vars'

export default defineConfig({
  shortcuts: {
    'page-title': `font-500 text-16px line-height-22px`,
    'auth-logo': 'w-[96px] h-[26px]',
    'flex-col-1': 'flex flex-col flex-1',
    'flex-center': 'flex items-center justify-center',
    'flex-between': 'flex items-center justify-between',
    'text-base-500': 'text-base/6 font-500',
    'text-sm-500': 'text-sm/22px font-500',
    'text-xs-500': 'text-xs/4 font-500',
    'text-base-700': 'text-base/6 font-700',
    'text-sm-700': 'text-sm/22px font-700',
    'text-xs-700': 'text-xs/4 font-700'
  },
  rules: [...borderColorRules, ...unoColorsRules, ...gradientColorsRules],
  theme: {
    boxShadow: {
      normal: '0px 4px 10px rgba(29, 33, 41, 0.1)'
    }
  },
  presets: [
    presetUno(),
    presetAttributify(),
    presetRemToPx() as any,
    presetWebFonts({
      ...webFontsOptions
    })
  ],
  transformers: [transformerDirectives(), transformerVariantGroup()]
})
